//
//  Common.swift
//  WeiBoDemo
//
//  Created by 郝涛 on 16/4/16.
//  Copyright © 2016年 郝涛. All rights reserved.
//

import UIKit
//通知名字
let switchdefaultNotificationname = "switchdefaultNotification"
// 屏幕的宽高
let SCREENW = UIScreen.mainScreen().bounds.width
let SCREENH = UIScreen.mainScreen().bounds.height

let AppKey = "1424215592"
let AppSecret="3dcdbb0deeb045825a4ced8a75a2ca39"
let REDIRECT_URI="http://www.baidu.com"
// RGB颜色
func RGB(red red: CGFloat, green: CGFloat, blue: CGFloat) -> UIColor{
    return UIColor(red: red / 255, green: green / 255, blue: blue / 255, alpha: 1)
}
// 随机颜色
func RandomColor() -> UIColor{
    
    // random() 有一个bug 每次程序启动起来后产生的随机数 都是相同
    let r = random() % 256
    let g = random() % 256
    let b = random() % 256
    return RGB(red: CGFloat(r), green: CGFloat(g), blue: CGFloat(b))
}

